EXTRA_DIST = \
	mmxfer.png \
	mmxfer.glade \
	mmxfer.py \
	src/simplemtp.pyx

ACLOCAL_AMFLAGS=-I m4

SUBDIRS = src pysrc/mmxfer

desktopdir = $(datadir)/applications
desktop_DATA = mmxfer.desktop

appdir = $(pkgdatadir)
app_DATA = mmxfer.glade mmxfer.png

scriptsdir = $(bindir)
scripts_SCRIPTS = mmxfer

AM_CPPFLAGS = @PACKAGE_LIBS@

clean-local:
	rm -f mmxfer.desktop mmxfer

mmxfer.desktop: Makefile
	@echo "[Desktop Entry]">mmxfer.desktop
	@echo "Name=MMXfer">>mmxfer.desktop
	@echo "Comment=Convert music and video and transfer it to a portable player using mtp">>mmxfer.desktop
	@echo "Exec=$(bindir)/mmxfer %U">>mmxfer.desktop
	@echo "Icon=$(appdir)/mmxfer.png">>mmxfer.desktop
	@echo "Terminal=0">>mmxfer.desktop
	@echo "Type=Application">>mmxfer.desktop
	@echo "Categories=Application;AudioVideo;">>mmxfer.desktop
	@echo "MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/smil;application/smil+xml;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktime-media-link;application/x-quicktimeplayer;application/x-shorten;application/x-smil;application/xspf+xml;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-scpls;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/google-video-pointer;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;">>mmxfer.desktop

mmxfer: $(srcdir)/mmxfer.py Makefile
	@echo "#!/usr/bin/env python$(PYTHON_VERSION)">mmxfer
	@echo "LIB_DIR=\"$(pkglibdir)\"">>mmxfer
	@echo "DATA_DIR=\"$(pkgdatadir)\"">>mmxfer
	@cat $(srcdir)/mmxfer.py>>mmxfer

